package com.ydgk.service.impl;

import com.ydgk.bean.View;
import com.ydgk.dao.ViewMapper;
import com.ydgk.service.ViewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ViewServiceImpl implements ViewService{
    @Autowired
    private ViewMapper viewMapper;

    public int insert(View view) {
        return viewMapper.insert(view);
    }

    public List<View> findByFid(int fid) {
        return viewMapper.findByFid(fid);
    }

    public int deleteByIdAndFid(int vid, int fid) {
        return viewMapper.deleteByIdAndFid(vid,fid);
    }

    public View findById(int vid) {
        return viewMapper.findById(vid);
    }
}
